package com.example.biketask.dao;

import com.example.biketask.pojo.DragOperation;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.type.JdbcType;

@Mapper
public interface Opt3Mapper {

    @Results(id = "Bt04Map", value = {
            @Result(property = "optId", column = "opt_id", jdbcType = JdbcType.INTEGER),
            @Result(property = "startLat", column = "drag_start_lat", jdbcType = JdbcType.DOUBLE),
            @Result(property = "startLon", column = "drag_start_lon", jdbcType = JdbcType.DOUBLE),
            @Result(property = "endLat", column = "drag_end_lat", jdbcType = JdbcType.DOUBLE),
            @Result(property = "endLon", column = "drag_end_lon", jdbcType = JdbcType.DOUBLE)
    })

    /*
    curd  bt_04表
     */
    @Insert("insert into bt_04(opt_id,drag_start_lat,drag_start_lon,drag_end_lat,drag_end_lon) values(#{optId},#{startLat},#{startLon},#{endLat},#{endLon})")
    int insert_bt_04(DragOperation dragOperation);

    /*
    更新
     */

    //@Update("update bt_03(opt_id,drag_start_lat,drag_start_lon,drag_end_lat,drag_end_lon) values(#{optId},#{startLat},#{startLon},#{endLat},#{endLon})")
    //int update_bt_04();
}
